package com.tianlan.blog.controller;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.tianlan.blog.entity.SysDept;
import com.tianlan.blog.service.SysDeptService;

@RestController
public class DeptController {

	@Autowired
	private SysDeptService deptService;
	
    @RequestMapping(value = "/dept/user/list", method = RequestMethod.GET)
    public List<SysDept> getUser(HttpServletRequest request) {
        return  deptService.getDepts();
    }
}
